[deps]
kernel-headers

[vars]
filesize=5340791
sha512=378c69f50bf4cc3e71b84a85bfdb6c9bdb2f6204e7b4e989e265513e9691a36903a393e9bba5201ac8642824de85895feafca4f562bf9c464779a0d457ef71df

[mirrors]
ftp://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-4.04.tar.bz2
http://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-4.04.tar.bz2
http://www.kernel.org/pub/linux/utils/boot/syslinux/4.xx/syslinux-4.04.tar.bz2
http://ftp.wh2.tu-dresden.de/pub/mirrors/kernel.org/linux/utils/boot/syslinux/syslinux-4.04.tar.bz2
http://ftp.hosteurope.de/mirror/ftp.kernel.org/pub/linux/utils/boot/syslinux/syslinux-4.04.tar.bz2
http://ftp.uni-ulm.de/pub/mirrors/kernel.org/utils/boot/syslinux/4.xx/syslinux-4.04.tar.bz2


[build]

sed -i '/#define statfs/d;/#undef statfs/d' libinstaller/linuxioctl.h

$HOSTCC -Wall "$K"/extlinux-bin2c-replacement.c -o libinstaller/bin2c.pl

PATH="$PATH:$PWD/libinstaller" make -j$MAKE_THREADS -C libinstaller CC="$CC" PERL=""
make -j$MAKE_THREADS -C extlinux \
  CC="$CC" OPTFLAGS="-D_GNU_SOURCE $optcflags" LDFLAGS="-static $optldflags"
make -j$MAKE_THREADS -C linux \
  CC="$CC" OPTFLAGS="-D_GNU_SOURCE $optcflags" LDFLAGS="-static $optldflags"

dest="${butch_install_dir}${butch_prefix}"
mkdir -p "$dest"/bin
cp extlinux/extlinux "$dest"/bin
cp linux/syslinux "$dest"/bin/
mkdir -p "$dest"/lib/syslinux
cp mbr/*mbr.bin "$dest"/lib/syslinux/
